package com.yanqu.road.server.cmd.banquet.party;

import com.yanqu.road.pb.banquet.BanquetProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.CrossProtocol;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_BANQUET_LEAVE, desc = "离开宴会")
public class LeavePartyCmd extends AbstractCommand {

    private String banquetId;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;

    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        /*	ret = BanquetMgr.removeBanquetScene(player.getUserId(),banquetId);*/
        BanquetProto.BanquetLeaveReq reqMsg = BanquetProto.BanquetLeaveReq.parseFrom(packet.getBytes());
        player.sendPacket(CrossProtocol.C_CROSS_LEAVE_PARTY, reqMsg.toBuilder());
    }

    @Override
    public void sendData(GamePlayer player) {
	/*	BanquetProto.BanquetLeaveResp.Builder respMsg = BanquetProto.BanquetLeaveResp.newBuilder();
		respMsg.setRet(ret);
		player.sendChannelPacket(Protocol.U_BANQUET_LEAVE, respMsg);*/
    }
}
